package cn.sxt.service.impl;

import cn.xbtop.domain.UserAddress;
import cn.xbtop.service.OrderService;
import cn.xbtop.service.UserService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/5/7 21:04
 */
@Service
public class OrderServiceImpl implements OrderService {
    // dubbo直连
    // 地址为本地提供服务的地址
    @Reference(url = "192.168.64.1:20882")
    private UserService userService;

    //提供set方法
    //public void setUserService(UserService userService){
    //    this.userService = userService;
    //}

    @Override
    public List<UserAddress> initOrder(String userid) {
        return userService.queryAllAddress(userid);
    }
}
